<template>
    <div>
      <div class="recommend-title">热销推荐</div>
      <ul>
        <router-link class="item border-bottom"
                     v-for="item of recommendList"
                     :key="item.id" tag="li"
                     :to="'/detail/' + item.id">
          <img class="item-img" :src="'/static/img/' + item.url" alt="">
          <div class="item-desc">
            <p class="item-desc-name">{{item.name}}</p>
            <p class="item-desc-discuss">
              <span class="iconfont">&#xe601;</span>
              <span class="iconfont">&#xe601;</span>
              <span class="iconfont">&#xe601;</span>
              <span class="iconfont">&#xe601;</span>
              <span class="iconfont">&#xe601;</span>
            </p>
            <div class="item-desc-price">
              <div><span class="item-desc-price-color">¥</span><span class="item-desc-price-color item-desc-price-size">{{item.price}}</span>&nbsp;起</div>
              <div>{{item.field}}</div>
            </div>
          </div>
        </router-link>
      </ul>
    </div>
</template>

<script>
export default {
  name: 'TravelRecommend',
  props: {
    recommendList: {
      type: Array
    }
  }
}
</script>

<style scoped lang="stylus">
  @import '~css/varibles.styl'
  .recommend-title
    height: .8rem
    line-height: .8rem
    background-color: #eee
    text-indent: .2rem
    margin-top: .2rem
  .item
    overflow: hidden
    display: flex
    height: 1.9rem
    .item-img
      width: 1.7rem
      height: 1.7rem
      margin: .1rem
    .item-desc
      flex: 1
      padding: .1rem .2rem
      .item-desc-name
        height: .54rem
        line-height .54rem
        font-size: .32rem
      .item-desc-discuss
        height: .4rem
        line-height: .4rem
        color: $recommendColor
        .iconfont
          font-size: .2rem
      .item-desc-price
        height: .76rem
        line-height: .76rem
        display: flex
        justify-content: space-between
        font-size: .24rem
        .item-desc-price-color
          color: #ff8300
        .item-desc-price-size
          font-size: .5rem
</style>
